using System.Linq;
using Magiq.Behaviors;

namespace Magiq.Query
{
    public class DefaultQueryBehavior : DefaultBehavior, IQueryBehavior
    {
        public IQueryStrategy<T> GetQueryStrategy<T>(IQuery<T> query) where T : class
        {
            return Magiq.ForQuery(query);
        }

        public IQueryable<T> Execute<T>(IQueryStrategy<T> strategy)
        {
            return strategy.Execute();
        }
    }
}